@tailwind base;
@tailwind components;
@tailwind utilities;

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;

  ::selection {
    background-color: hsl(var(--apkt-background-accent-primary) / 0.1);
  }
}

@layer base {
  :root {
    --apkt-background-primary: 0 0% 100%;
    --apkt-background-invert: 0 0% 13%;
    --apkt-background-accent-primary: 207 93% 49%;

    --apkt-foreground-primary: 0 0% 95%;
    --apkt-foreground-secondary: 0 0% 91%;
    --apkt-foreground-tertiary: 0 0% 82%;
    --apkt-foreground-accent: 231 100% 70%;

    --apkt-border: 0 0% 91%;
    --apkt-border-secondary: 0 0% 82%;
    --apkt-border-accent: 207 93% 49%;
    --apkt-border-accent-certified: 44 31% 68%;
    --apkt-border-success: 0.42 55% 42%;
    --apkt-border-error: 0.02 73% 54%;
    --apkt-border-warning: 0.09 88% 60%;

    --apkt-text-primary: 0 0% 13%;
    --apkt-text-secondary: 0 0% 60%;
    --apkt-text-tertiary: 0 0% 42%;
    --apkt-text-invert: 0 0% 100%;

    --background: 0 0% 100%;
    --foreground: 0 0% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 3.9%;
    --primary: 0 0% 9%;
    --primary-foreground: 0 0% 98%;
    --secondary: 0 0% 96.1%;
    --secondary-foreground: 0 0% 9%;
    --muted: 0 0% 96.1%;
    --muted-foreground: 0 0% 45.1%;
    --accent: 0 0% 96.1%;
    --accent-foreground: 0 0% 9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 89.8%;
    --input: 0 0% 89.8%;
    --ring: 0 0% 3.9%;
    --radius: 0.5rem;

    --apkt-border-sm: 8px;
    --apkt-border-md: 12px;
    --apkt-border-lg: 16px;

    --box-shadow-picked-up: 0px 2px 8px 2px hsl(var(--apkt-background-primary) / 0.5);

    /* Page Background */
    --page-background-image-color: hsl(0, 0%, 87%);
  }
  .dark {
    --apkt-background-primary: 0 0% 13%;
    --apkt-background-invert: 0 0% 100%;
    --apkt-background-accent-primary: 207 93% 49%;

    --apkt-foreground-primary: 0 0% 15%;
    --apkt-foreground-secondary: 0 0% 16%;
    --apkt-foreground-tertiary: 0 0% 21%;
    --apkt-foreground-accent: 207 92.8% 48.8%;

    --apkt-border: 0 0% 16%;
    --apkt-border-secondary: 0 0% 31%;
    --apkt-border-accent: 207 93% 49%;
    --apkt-border-accent-certified: 0.12 31% 68%;
    --apkt-border-success: 0.42 55% 42%;
    --apkt-border-error: 0.02 73% 54%;
    --apkt-border-warning: 0.09 88% 60%;

    --apkt-text-primary: 0 0% 100%;
    --apkt-text-secondary: 0 0% 60%;
    --apkt-text-tertiary: 0 0% 73%;
    --apkt-text-invert: 0 0% 13%;

    --background: 0 0% 3.9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 14.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 14.9%;
    --muted-foreground: 0 0% 63.9%;
    --accent: 0 0% 14.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 14.9%;
    --input: 0 0% 14.9%;
    --ring: 0 0% 83.1%;

    /* Page Background */
    --page-background-image-color: hsl(0deg 0% 17.25%);
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground h-[100svh];
  }
  .inset-shadow {
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
  }
  wui-card {
    box-shadow: 0 0 24px 0px rgba(0, 0, 0, 0.15);
  }
  .ease {
    transition-timing-function: cubic-bezier(0.45, 0, 0.55, 1);
  }
  .page-container {
    background-image: radial-gradient(var(--page-background-image-color) 1px, #ffffff00 1px);
    background-size: 16px 16px;
    background-position: -16px -8px;
  }
}
